package com.lepu.app.fun.grow.setting;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.app.utils.UmengEvent;
import com.core.lib.application.BaseFragmentActivity;
import com.core.lib.utils.main.UmengHelper;
import com.eyzhs.app.R;
import com.lepu.app.fun.grow.play.PlayImageAutoActivity;
import com.lepu.app.widget.CustomTopBarNew;
import com.lepu.app.widget.CustomTopBarNew.OnTopbarNewLeftLayoutListener;

public class GrowSettingActivity extends BaseFragmentActivity implements
		OnTopbarNewLeftLayoutListener {

	@Override
	@SuppressLint("InflateParams")
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.grow_setting_activity);

		init();
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
	}

	private void init() {
		// topbar
		CustomTopBarNew topbar = (CustomTopBarNew) findViewById(R.id.topbar);
		topbar.setTopbarTitle("个性化");
		topbar.setonTopbarNewLeftLayoutListener(this);

//		TextView albumNameValueTextView = (TextView) findViewById(R.id.albumNameValueTextView);
//		albumNameValueTextView.setText(AppConfig.getConfigString(this,
//				Const.CONFIG_APP_ALBUM_NAME, Const.DEFAULT_CUSTOM_ALBUM_NAME));
	}

	public void viewClick(View v) {
		switch (v.getId()) {
		case R.id.musicLayout:
			Intent musicIntent = new Intent(GrowSettingActivity.this,
					GrowSettingMusicActivity.class);
			startActivity(musicIntent, true);
			break;
		case R.id.albumImageLayout:
			Intent imageIntent = new Intent(GrowSettingActivity.this,
					GrowSettingAlbumImageActivity.class);
			startActivity(imageIntent, true);
			break;
		case R.id.albumNameLayout:
			Intent nameIntent = new Intent(GrowSettingActivity.this,
					GrowSettingAlbumNameActivity.class);
			startActivity(nameIntent, true);
			break;
		case R.id.playSpeedLayout:
			Intent speedIntent = new Intent(GrowSettingActivity.this,
					GrowSettingSpeedActivity.class);
			startActivity(speedIntent, true);
			break;
		case R.id.playSampleLayout:
			
			Intent playIntent = new Intent(GrowSettingActivity.this,
					PlayImageAutoActivity.class);
			startActivity(playIntent, true);
			break;

		default:
			break;
		}
	}

	@Override
	public void onBackPressed() {
		finish(true);
	}

	@Override
	public void onTopbarLeftLayoutSelected() {
		finish(true);
	}
}
